package com.alquiler.controllers;

import java.awt.Label;
import java.io.File;
import java.net.URL;
import java.util.ResourceBundle;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;

import com.alquiler.implementation.IScreenParent;

public class IndexController implements Initializable, IScreenParent{
	
	MainController mainController;	
	
	@FXML
    private Label horaLabel;
	
	
	@FXML
    void generarReporte(ActionEvent event) {
		
		
    }

	
	
	@Override
	public void setScreenParent(MainController screenParent){
		mainController = screenParent;
    }	

	@Override
	public void initialize(URL location, ResourceBundle resources) {
		
		try {
			
			File theDir = new File("C:/sistemaHuella/");
			  // if the directory does not exist, create it
		    if (!theDir.exists()) {		   
			     theDir.mkdir();
			}  
			
	    }
	    catch (Exception e) {
	      e.printStackTrace();
	    }
		
		
	
//		Timer timer = new java.util.Timer();
//
//    	timer.schedule(new TimerTask() {
//    	    public void run() {
//    	         Platform.runLater(new Runnable() {
//    	            public void run() {
//    	                Time hora=new Time(new Date().getTime());
//    	                 horaLabel.setText(hora.toString());
//    	            }
//    	        });
//    	    }
//    	}, 1000, 1000);
		
	}

}
